# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=blueprint
pkgver=0.1_3
pkgrel=10
pkgdesc='A perl tool to identify Bluetooth devices.'
url='https://trifinite.org/trifinite_stuff_blueprinting.html'
groups=('blackarch' 'blackarch-bluetooth')
license=('GPL')
depends=('perl' 'perl-switch')
arch=('any')
source=("https://trifinite.org/Downloads/bp_v01-3.zip")
sha512sums=('328d331ca71ed44f5b20b6aad4b83444323b1ab42e341b99cb0db3437ead77bb54c9eeb68115cb634903744802f01935fd618708471ac460bbcb6813362bcc94')

package() {
  cd bp

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -r * "$pkgdir/usr/share/$pkgname/"
  chmod -R a+rX "$pkgdir"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname/
exec perl bp.pl \$@
EOF

  chmod 755 "$pkgdir/usr/bin/$pkgname"
}

